<?php

class ZFPainel_Auth extends Zend_Auth
{

    protected $authStorageNamespace = 'ZFPainel';

    /**
     *
     * @var ZFPainel_Auth_UsuarioDados
     */
    protected $userDataStorage;

    protected function __construct()
    {
        //parent::__construct();
        $this->setStorage(new Zend_Auth_Storage_Session($this->authStorageNamespace));
    }

    /**
     * 
     * @return ZFPainel_Auth
     */
    public static function getInstance()
    {
        return Zend_Registry::get('ZFPainel_Auth');
    }

    /**
     * 
     * @return Zend_Auth_Storage_Interface
     */
    public function getUserDataStorage()
    {
        return $this->userDataStorage;
    }

    public function setUserDataStorage(Zend_Auth_Storage_Interface $userDataStorage)
    {
        $this->userDataStorage = $userDataStorage;
    }

}
